Hi,
I’ve got a
client who wants to use the KMotionCNC stop button not
only as an emergency
button, but also as a means of shutting his machine down
/ pausing in case he’s
out for coffee. This saves on energy, noise and oil
(when the axes are enabled
the oil pump lubes the linear ways on a fixed interval).
When he
then returns to resume work, he does not want to
re-home.
Pressing
the stop button kills all threads, the raw machine
coordinates remain, so
re-homing should not be necessary. However, upon
re-initialization the KMotionCNC
G-code position is lost or jumps to some other value.
This is expected
behavior, since the G-code interpreter state is lost
upon pressing stop.
So what is
the nicest way to set the KMotionCNC G-code coordinates
back?
I thought about
writing a stop.c program that is called upon pressing
stop and then saving the DRO's as persist variables and
than add some code to init.c to set the KMotionCNC DRO's
back, but there is probably a better way of doing this.